// index.js
// 获取应用实例
// const app = getApp()

Page({
  data: {
    list: [],
    shopbtList: [],
    floorList: []
  },
  onLoad() {
    this.getSweiper()
    this.getshopbt()
    this.getfloor()
  },

  //轮播图
  getSweiper: async function () {
    let {
      data
    } = await wx.indexApi.swipwedata()
    console.log(data);
    data.message.map(item => item.navigator_url = (item.navigator_url).replace("main", "index"))
    this.setData({
      list: data.message
    })
  },
  //商品标题
  getshopbt: async function () {
    let {
      data
    } = await wx.indexApi.bannerdata()
    console.log(data);
    this.setData({
      shopbtList: data.message
    })
  },
  //楼层数据
  getfloor: async function () {
    let {
      data
    } = await wx.indexApi.contentdata()
    console.log(data);
    this.setData({
      floorList: data.message
    })
  },
  //menu跳转页面
  clickUrl: function (e) {
    console.log(e);
  }
})